home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Demos / Bowers Development / AppMaker 2.0b5 / Examples / Procedural / Gadgets / Globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-19  |  2.1 KB  |  85 lines  |  [TEXT/MMCC]

  1. /* Globals.h */
  2. /* Created 01/01/95 12:01 PM by AppMaker */
  3.  
  4. #ifndef _H_Globals
  5. #define _H_Globals
  6.  
  7. typedef struct {
  8.     /* Standard fields: */
  9.         TEHandle        text;
  10.         ControlHandle    vScroll;
  11.         ControlHandle    hScroll;
  12.         short            fileNum;
  13.         Boolean            dirty;
  14.         StringHandle    filename;
  15.         enum {noWindow, WButtons, WTabbedPanel, WSliders, WProgressBars, WPallette}    windowKind;
  16.         Handle            witlHandle;        /* Window itemlist resource */
  17.         Handle            wictHandle;        /* Window item color table resource */
  18.  
  19.     /* Application-specific fields: */
  20.     /* for Buttons: */
  21.         ControlHandle    OKHandle;
  22.         ControlHandle    X3DHandle;
  23.         ControlHandle    PictButtonHandle;
  24.         ControlHandle    TitledPictHandle;
  25.         ControlHandle    CheckHandle;
  26.         Boolean            CheckChecked;
  27.         ControlHandle    PictCheckHandle;
  28.         Boolean            PictCheckChecked;
  29.         ControlHandle    X3DCheckHandle;
  30.         Boolean            X3DCheckChecked;
  31.  
  32.     /* for TabbedPanel: */
  33.         ControlHandle    TabPanelHandle;
  34.         short            TabPanelValue;
  35.  
  36.     /* for Sliders: */
  37.         ControlHandle        VerticalHandle;
  38.         ControlHandle        SliderHandle;
  39.         ControlHandle        SpinnerHandle;
  40.         ControlHandle        HorizontalHandle;
  41.         ControlHandle        PictSliderHandle;
  42.  
  43.     /* for ProgressBars: */
  44.         ControlHandle    RectHandle;
  45.         short            RectValue;
  46.         ControlHandle    BarberHandle;
  47.         short            BarberValue;
  48.         ControlHandle    ProgressHandle;
  49.         short            ProgressValue;
  50.  
  51.     /* for Pallette: */
  52.         ControlHandle    ToolsHandle;
  53.         short            ToolsChoice;
  54.  
  55.  
  56. } WinInfoRec, *WinInfoPtr;
  57.  
  58. typedef struct {
  59.     Boolean            hasGestalt;            /* has Gestalt manager    */
  60.     Boolean            hasWNE;                /* has WaitNextEvent    */
  61.     Boolean            hasColorQD;            /* has Color QuickDraw    */
  62.     Boolean            hasAppleEvents;        /* has Apple Events        */
  63.     Boolean            hasEditionMgr;        /* has Edition Manager    */
  64. } SysConfigRec;
  65.  
  66. /* Standard vars: */
  67. extern Boolean            quittingTime;
  68. extern EventRecord        curEvent;
  69. extern WindowPtr        curWindow;
  70. extern WinInfoPtr        cur;
  71. extern Boolean            inBackground;
  72. extern SysConfigRec        sysConfig;
  73.  
  74. /* Application-specific vars: */
  75.  
  76. /*----------*/
  77. void    InitGlobals        (void);
  78. void    SetInfo            (WindowPtr        window);
  79. void    SetNewInfo        (WindowPtr        window);
  80. void    DiscardInfo        (WindowPtr        window);
  81.  
  82. #endif    /* _H_Globals */
  83.  
  84. /* Globals */
  85.